﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections;

namespace UI
{
    public class SessionHelper
    {
        //用户帐号，登录帐号
        private string _UserName = "";
        public string UserName { get { return _UserName; } set { _UserName = value; } }
        //用户名
        private string _PassWord = "";
        public string PassWord { get { return _PassWord; } set { _PassWord = value; } }

        private string _Role = "";
        public string Role { get { return _Role; } set { _Role = value; } }

        private IList _Authorities;
        public IList Authorities { get { return _Authorities; } set { _Authorities = value; } }
        private static SessionHelper _CurrentUser = null;
        //应用单件模式，保存用户登录状态

        public static SessionHelper CurrentUser
        {
            get
            {
                if (_CurrentUser == null)
                    _CurrentUser = new SessionHelper();
                return _CurrentUser;
            }
        }
        
    }
    
}
